Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce custom exex wal errors #11789

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

caglaryucekaya
Copy link
Contributor

Closes #11423

@shekhirin shekhirin added C-debt Refactor of code section that is hard to understand or maintain A-exex Execution Extensions labels Oct 16, 2024
Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, only some suggestions on error variants

Comment on lines 11 to 22
/// Directory operation `FsPathError`
#[error("directory operation error: {0}")]
DirFsPath(reth_fs_util::FsPathError),
/// Directory operation IO Error
#[error("directory operation error: {0}")]
DirIO(std::io::Error),
/// File operation `FsPathError`
#[error("file operation error on file with id {0}: {1}")]
FileFsPath(u32, reth_fs_util::FsPathError),
/// File operation IO Error
#[error("file operation error on file with id {0}: {1}")]
FileIO(u32, std::io::Error),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some suggestions on error variants to make them more specific

Suggested change
/// Directory operation `FsPathError`
#[error("directory operation error: {0}")]
DirFsPath(reth_fs_util::FsPathError),
/// Directory operation IO Error
#[error("directory operation error: {0}")]
DirIO(std::io::Error),
/// File operation `FsPathError`
#[error("file operation error on file with id {0}: {1}")]
FileFsPath(u32, reth_fs_util::FsPathError),
/// File operation IO Error
#[error("file operation error on file with id {0}: {1}")]
FileIO(u32, std::io::Error),
/// Filesystem error at the path
#[error(transparent)]
FsPathError(#[from] reth_fs_util::FsPathError),
/// Directory entry reading error
#[error("failed to get {0} directory entry: {0}")]
DirEntry(PathBuf, std::io::Error),
/// Error when reading file metadata
#[error("failed to get metadata for file {0}: {1}")]
FileMetadata(u32, std::io::Error),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-exex Execution Extensions C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce a custom enum for ExEx WAL errors
2 participants